ihelpuoo.weboo.runtime.Action = function(m)
{
	this.module	= m;
	this.name	= null;
	this.detail = null;
	this.HTML	= null;
}

ihelpuoo.weboo.runtime.Action.prototype
=
{
	fullName: function()
	{
		return this.module.name + "." + this.name;	
	}
	
	,
	setName: function(name)
	{
		this.name = name;
	}

	,
	valueOf: function(ele)
	{
		this.name = ele.getAttribute("name");
	}
	
	,
	render: function()
	{
		if(null==this.HTML)
			this.HTML = new ihelpuoo.weboo.runtime.ActionHTML();
		if(this.module.isActiveAction(this))
			this.HTML.highlight();
		else
			this.HTML.dishighlight();
		this.HTML.setName(this.name);
		this.HTML.setModuleName(this.module.name);
		return this.HTML.shell;
	}
	
	,
	getDetail: function()
	{
		if(null==this.detail)
		{
			var rt = ihelpuoo.weboo.runtime.me();
			var xml = ihelpuoo.http.GETXML(ihelpuoo.http.server().url(rt.NAME,rt.URL_GET_ACTIONDETAIL,"moduleName="+this.module.name+"&actionName="+this.name));
			this.detail = new ihelpuoo.weboo.runtime.ActionDetail(this);
			this.detail.valueOf(xml.documentElement);
		}
		return this.detail;
	}
	
	,
	disactive: function()
	{
		this.HTML.dishighlight();
		if(null!=this.detail)
			if(null!=this.detail.HTML)
				this.detail.HTML.hide();		
	}
	
}